/* eslint-disable */
document.write('<script src="/module/js/com/tridium/js/ext/require/require.min.js?version=1544412231872"></script>');
document.write('<script src="/module/js/rc/js.built.min.js?version=1544412231872"></script>');
var require = typeof require === 'undefined' ? {} : require;
require.urlArgs = require.urlArgs || 'version=1544412231872';
require.waitSeconds = 0;
require.config = require.config || {};
require.config.ord = require.config.ord || {};
require.config.ord.useLocalWbRc = false;
require.config.baja = require.config.baja || {};
require.config.baja.webdev = false;
require.config.baja.offline = false;
require.config.lex = require.config.lex || {};
require.config.lex.webdev = false;
require.hbs = require.hbs || {};
require.hbs.i18n = require.hbs.i18n === undefined ? false : require.hbs.i18n;
require.hbs.helpers = require.hbs.helpers === undefined ? false : require.hbs.helpers;
require.hbs.fetchText = function (uri, callback) {
  function unmodularize(href) {
    let res;
    if (href) {
      res = /^module:\/\/(.+)$/.exec(href);
      if (res && res[1]) {
        href = '/module/' + res[1];
      }
    }
    return href;
  }

  require(['baja!', 'jquery'], function (baja, $) {
    if (baja.isOffline()) {
      uri = /([^?]*)\??.*/.exec(uri)[1];
      uri = uri.replace('https://workbench/module/', 'module://');
      baja.rpc('type:web:FileRpc', 'readTextFile', uri)
        .then(function (text) {
          callback(text, uri);
        });
    } else {
      $.ajax(unmodularize(uri)).then(function (text) {
        callback(text, uri);
      });
    }
  });
};
require.config['nmodule/js/rc/lex/lex'] = {storageId: '1544412231872, lex: zh-CN'};
require.map = require.map || {};
require.map['*'] = require.map['*'] || {};
require.paths = require.paths || {};
require.paths.nmodule = require.paths.nmodule || '/module';
require.paths.Promise = require.paths.Promise || '/module/js/rc/bluebird/bluebird.min';
require.paths.bajaScript = require.paths.bajaScript || '/module/bajaScript/rc';
require.paths.bajaux = require.paths.bajaux || '/module/bajaux/rc';
// require.paths.jquery = require.paths.jquery || '/module/js/rc/jquery/jquery-3.4.1.min'; //Niagara 4.9
require.paths.jquery = require.paths.jquery || '/module/js/rc/jquery/jquery.min'; //Niagara 4.14
require.paths.dialogs = require.paths.dialogs || '/module/js/rc/dialogs/dialogs';
require.map['*']['lex'] = 'nmodule/js/rc/lex/lexplugin';
require.map['*']['log'] = 'nmodule/js/rc/log/logPlugin';
require.paths.css = require.paths.css || '/module/js/com/tridium/js/ext/require/css';
require.paths.text = require.paths.text || '/module/js/com/tridium/js/ext/require/text';
require.paths.baja = require.paths.baja || '/module/bajaScript/rc/plugin/baja';
require.paths.Handlebars = require.paths.Handlebars || '/module/js/rc/handlebars/handlebars.min'; //Niagara 4.9
require.paths.underscore = require.paths.underscore || '/module/js/rc/underscore/underscore.min';
require.paths.hbs = require.paths.hbs || '/module/js/rc/require-handlebars-plugin/hbs.built.min';
require.paths.moment = require.paths.moment || '/module/js/rc/moment/moment.min';
require.paths.d3 = require.paths.d3 || '/module/js/rc/d3/d3.min';
require.paths.hx = require.paths.hx || '/module/hx/javax/baja/hx/hx';
require.paths.jqueryContextMenu = require.paths.jqueryContextMenu || '/module/js/rc/jquery/contextMenu/jquery.contextMenu';
require.paths.ace = require.paths.ace || '/module/js/rc/ace';
require.shim = require.shim || {};
require.shim.d3 = require.shim.d3 || {};
require.shim.d3.exports = require.shim.d3.exports || 'd3';
require.shim.jqueryContextMenu = require.shim.jqueryContextMenu || {deps: ['jquery'], exports: 'jQuery'};
require(['Promise'], function (Promise) {
  if (!Promise.config) {
    return;
  }
  Promise.config({warnings: false, longStackTraces: false, cancellation: false, monitoring: false});
});
define('niagaraSystemProperties', function () {
  return {};
});
// window.bajaPromise = new Promise((resolve)=>{
//   require(['baja!'], (baja) => {
//     "use strict";
//     console.log("Baja()", baja);
//     resolve(baja);
//   })
// });
